package org.basic.mail.domain.bo;

import org.basic.common.core.validate.AddGroup;
import org.basic.common.core.validate.EditGroup;

import org.basic.common.mybatis.core.domain.BaseEntity;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import org.basic.mail.domain.SysMailAccount;

/**
 * 邮箱账号业务对象 sys_mail_account
 *
 * @author Shao Hua
 * @date 2023-07-27
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SysMailAccount.class, reverseConvertGenerate = false)
public class SysMailAccountBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 邮箱
     */
    @NotBlank(message = "邮箱不能为空", groups = { AddGroup.class, EditGroup.class })
    private String mail;

    /**
     * 用户名
     */
    @NotBlank(message = "用户名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String username;

    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String password;

    /**
     * SMTP 服务器域名
     */
    @NotBlank(message = "SMTP 服务器域名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String host;

    /**
     * SMTP 服务器端口
     */
    @NotNull(message = "SMTP 服务器端口不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long port;

    /**
     * 是否开启 SSL
     */
    @NotNull(message = "是否开启 SSL不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer sslEnable;


}
